#define _CRT_SECURE_NO_WARNINGS 2
#include <stdio.h>
int into(int x, int y)
{
    int z = x / y;
    return z;
}

int YS(int x, int y)
{
    int ys = x % y;
    return ys;
}


int main()
{
    int a = 0;
    int b = 0;
    int c = 0;
    int YS = 0;

    scanf("%d %d", &a, &b);
    c = into(a, b);
    YS = a % b;
    printf("%d %d", c, YS);

    return 0;
}